#ifndef H_RCGD_CTRLMON_H
#define H_RCGD_CTRLMON_H

#define RECEIVER_ALARM_RECOVERY_RANGE 400
#define RECEIVER_ALARM_ESCAPE_RANGE 500

extern char freq_stable_enough;


typedef struct{

	char	ALARM_CONTROL;
	char	alarm_flag;
	int 	alarm_start_time;
	int		offset_table[20];
	int		offset_index;

	int		last_offset;

	int		good_start_time;
	int		good_start_last_time;
	int		prev_offset;

	int		skip_counter;
	char	start_flag;

	int alarm_counter;
} RcvAlarm_;



extern char	SKIP_RECEIVER_ALARM_CONTROL;
extern char	SKIP_CONTROL;
extern char	SKIP_CALC;

extern RcvAlarm_ RcvAlarm;

extern void Init_Ctrlmon();
extern void CheckReceiverAlarm(int);
extern void CheckReceiverGood(int);
extern void monitor_traim(void);

extern int glov_off;
extern int glov_last;
extern int online_alarm_range;
extern int receiver_offset;

#endif
